package com.yyrj.spring.client;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public final class SpringUtils {
	private static Object bean;
	
	public static Object getBean1(String beanName) {
		BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
		bean = factory.getBean(beanName);
		
		return bean;
	}
	SpringUtils() {
	}
//static{
//	BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
//}

}
